/**
 * 客户管理API
 */
import request from '/@/utils/request';

export function readAllCustomer(params: any) {
  return request({
    url: 'customers',
    method: 'get',
    params,
  });
}

export function createCustomer(data: any) {
  return request({
    url: 'customers',
    method: 'post',
    data,
  });
}

export function updateCustomer(id: string, data: any) {
  return request({
    url: `customers/${id}`,
    method: 'patch',
    data,
  });
}

export function deleteCustomer(id: string) {
  return request({
    url: `customers/${id}`,
    method: 'delete',
  });
}
